package com.yingdong.gateserver.innter.handler;

import com.yingdong.gateserver.innter.message.GameMessage;
import com.yingdong.gateserver.net.GameSession;
import com.yingdong.gateserver.opcode.Dispatcher;

public class DisconnectedHandler extends GateServerHandler {

	@Override
	public int handle(int sessionId, GameMessage buffer) {
		GameSession session = Dispatcher.sessionMap.get(sessionId);
		Dispatcher.sessionMap.remove(sessionId);
		if (session != null) {
			session.getChannel().close();
		}
		return 0;
	}

}
